package com.koala.design.watch;

/**
 * @author yantingrui
 * @date 2022/8/15   10:14
 */
public class Watcher {
    private String name;

    public Watcher(String name) {
        this.name = name;
    }

    public void update(Subject subject) {
        System.out.println(String.format("%s 收到 %s %s 的通知", name, subject.getName(), subject.getTodo()));
    }
}
